package size;

import org.openjdk.jol.info.ClassLayout;

public class JOLUtils {

    public static void main(String[] args) {
        TestClass testClass = new TestClass();
        System.out.println(ClassLayout.parseInstance(testClass).toPrintable());

        System.out.println(ClassLayout.parseInstance(new int[100]).toPrintable());

        System.out.println(ClassLayout.parseInstance(new Integer[100]).toPrintable());

        System.out.println(ClassLayout.parseInstance(new Integer(100)).toPrintable());
        System.out.println(ClassLayout.parseInstance(new Long(100L)).toPrintable());
        System.out.println(ClassLayout.parseInstance(new Float(100f)).toPrintable());
        System.out.println(ClassLayout.parseInstance(new Double(100d)).toPrintable());
    }

    public static class TestClass{
        private boolean a;
        private byte b;
        private short c;
        private double d;
        private int  e;
        private long f;

        private Boolean a1;
        private Byte b1;
        private Short c1;
        private Double d1;
        private Integer  e1;
        private Long f1;

        private  Object g = new Object();
        private char h = 'A';
        private Object[] objArr = new Object[2];
    }
}
